package com.mhc.suzuki.manager;

import com.subaru.common.query.PageResult;
import com.mhc.suzuki.dal.model.OrderCustomerRelDO;
import com.mhc.suzuki.dal.query.OrderCustomerRelQuery;

import java.util.List;
import java.util.Map;


/**
 * Manager for OrderCustomerRel.
 */
public interface OrderCustomerRelManager {
    /**
     * query count by query condition.
     */
    int countByQuery(OrderCustomerRelQuery query);

    /**
     * delete by query condition.
     */
    int deleteByQuery(OrderCustomerRelQuery query);

    /**
     * delete by primary key.
     */
    int deleteByPrimaryKey(OrderCustomerRelDO record);

    /**
     * insert selective.
     */
    long insertSelective(OrderCustomerRelDO record);

    /**
     * select by query condition.
     */
    List<OrderCustomerRelDO> selectByQuery(OrderCustomerRelQuery query);


    /**
     * select by query condition with page.
     */
    PageResult<OrderCustomerRelDO> selectByQueryWithPage(OrderCustomerRelQuery query);

    /**
     * select by primary key.
     */
    OrderCustomerRelDO selectByPrimaryKey(Long id);

    /**
     * update by query condition selective.
     */
    int updateByQuerySelective( OrderCustomerRelDO record,  OrderCustomerRelQuery query);

    /**
     * update by query condition.
     */
    int updateByQuery(OrderCustomerRelDO record, OrderCustomerRelQuery query);

    /**
     * update by primary key selective.
     */
    int updateByPrimaryKeySelective(OrderCustomerRelDO record);

    /**
     * 更换主贷人
     * @param map
     * @return
     */
    int exchangeBuyer(Map map);
}